package com.restful.dao;

import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Request;
import javax.ws.rs.core.UriInfo;

import com.restful.resources.UserInfoResources;
import com.restful.test.UserInfo;

@Path("/ManageUser")
public class SpringDao {
	private volatile UserInfoResources userInfoResources;
	@Context
	UriInfo uriInfo;
	@Context
	Request request;
	
	public SpringDao(){
	}
	
	public SpringDao(UriInfo uriInfo, Request request){
		this.uriInfo = uriInfo;
		this.request = request;
	}

	public UserInfoResources getUserInfoResources() {
		return userInfoResources;
	}

	public void setUserInfoResources(UserInfoResources userInfoResources) {
		this.userInfoResources = userInfoResources;
	}
	
	@GET
	public List<UserInfo> getUser(){
		return (List<UserInfo>) userInfoResources.getModel().values();
	}
}
